using System;
using System.Collections.Generic;
using System.Linq;
namespace time
{
    public class work_lamda1
    {
        public static void Main()
        {
            city c1 = new city() { CityID = "1", CityName = "beijing" };
            city c2 = new city() { CityID = "2", CityName = "tianjin" };
            city c3 = new city() { CityID = "3", CityName = "shanghai" };
            List<city> cs = new List<city>();
            cs.Add(c1);
            cs.Add(c2);
            cs.Add(c3);

            var a = cs.Select(m => m);
            var l = a.ToList();
            Console.WriteLine(a);
            Console.WriteLine(l);

            Console.WriteLine();

            foreach (var item in l)
            {
                Console.WriteLine(item.CityName);
            }

            Console.Read();
        }
    }
}